business-value-ux

(0 reviews)

TMF 679 POST - Product Offering Qualification

Evaluates promotional coupon eligibility for a customer based on profile attributes and transaction context. Triggered when category.name == "couponEligibility" for a BANCAN or MSISDN (either of them are required to identify the account)
URL
https://[localhost]:[port]/business-value-ux/v1/{businessId}/productOfferingQualification/productOfferingQualification
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
nametypedescriptionrequired
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.Y
Request to check Coupon Eligibility:
curl --location --request POST 'https://nonprod.esb.cloud.lla.com/dev/business-value-ux/v1/PR/productOfferingQualification/productOfferingQualification' \
--header 'client_id: xxxx' \
--header 'client_secret: xxxx' \
--header 'X-Correlation-ID: {guid}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "category": {
        "name": "couponEligibility"
    },
    "channel": {
        "id": "USSD",
        "name": "USSD",
        "@type": "ChannelRef"
    },
    "productOfferingQualificationItem": [
        {
            "id": "1",
            "product": {
                "billingAccount": {
                    "id": "BAN-123456"
                },
                "realizingResource": [
                    {
                        "id": "18765551234",
                        "name": "msisdn"
                    }
                ],
                "productPrice": [
                    {
                        "priceType": "rechargeAmount",
                        "price": {
                            "dutyFreeAmount": {
                                "value": 10.00
                            }
                        }
                    }
                ],
                "productCharacteristic": [
                    {
                        "name": "coupon_tags",
                        "value": [
                            "recharge",
                            "loyalty"
                        ]
                    },
                    {
                        "name": "last_recharge_channel",
                        "value": "B2C"
                    },
                    {
                        "name": "plan_type",
                        "value": "prepaid"
                    },
                    {
                        "name": "balance",
                        "value": "12.50"
                    }
                ],
                "@type": "Product"
            },
            "@type": "ProductOfferingQualificationItem"
        }
    ],
    "@type": "ProductOfferingQualification"
}'
Definitions

Each of the request parameters is detailed.

nametypedescriptionrequired
category.namestringStatic label identifying the operation. Expected value: "couponEligibility"Y
channelobjectChannel through which the transaction originatesY
channel.idstringChannel id. Example: "USSD"Y
channel.namestringChannel name. Example: "USSD"Y
channel.@typestringStatic value: "ChannelRef"Y
productOfferingQualificationItemarrayList of qualification items. One item per evaluation request.Y
productOfferingQualificationItem[].idstringSequence identifier for the item. Example: "1"Y
productOfferingQualificationItem[].productobjectCustomer product/line detailsY
productOfferingQualificationItem[].product.billingAccountobjectBilling account for the customerY*
productOfferingQualificationItem[].product.billingAccount.idstringCustomer Billing Account Number (BAN). Example: "BAN-123456"Y*
productOfferingQualificationItem[].product.realizingResourceobjectResource realizing the product (MSISDN)Y*
productOfferingQualificationItem[].product.realizingResource.idstringMSISDN of the line. Example: "18765551234"Y*
productOfferingQualificationItem[].product.realizingResource.namestringStatic value: "msisdn"Y*
productOfferingQualificationItem[].product.productPricearrayDevice pricing detailsO
productOfferingQualificationItem[].product.productPrice[priceType=rechargeAmount].price.dutyFreeAmount.valuenumberRecharge Amount.O
productOfferingQualificationItem[].product.productCharacteristicarrayAdditional customer and transaction attributes used for rule evaluationO
productOfferingQualificationItem[].product.productCharacteristic[name=coupon_tags].valuearrayTags used for coupon matching. Maps to coupon_tags. Example: ["recharge","loyalty"]O
productOfferingQualificationItem[].product.productCharacteristic[name=last_recharge_channel].valuestringLast Channel to RechargeO
productOfferingQualificationItem[].product.productCharacteristic[name=plan_type].valuestringType of plan. e.g. prepaidO
productOfferingQualificationItem[].product.productCharacteristic[name=balance].valuestringBalance of the accountO
productOfferingQualificationItem[].product.@typestringStatic value: "Product"Y
productOfferingQualificationItem[].@typestringStatic value: "ProductOfferingQualificationItem"Y
@typestringStatic value: "ProductOfferingQualification"Y
Response
{
    "@type": "ProductOfferingQualification",
    "productOfferingQualificationItem": [
        {
            "id": "1",
            "state": "done",
            "qualificationItemResult": "eligible",
            "productOffering": {
                "id": "CPN031",
                "name": "Loyalty $10 credits on MRC Recharge",
                "@type": "ProductOfferingRef"
            },
            "product": {
                "productTerm": [
                    {
                        "name": "promotionTerm",
                        "duration": {
                            "amount": 36,
                            "units": "months"
                        },
                        "validFor": {
                            "startDateTime": "2019-03-15T10:30:21.000Z",
                            "endDateTime": "2020-03-15T10:30:21.000Z"
                        },
                        "@type": "ProductTerm"
                    }
                ],
                "productPrice": [
                    {
                        "priceType": "discountValue",
                        "price": {
                            "dutyFreeAmount": {
                                "value": 10.00
                            }
                        }
                    }
                ],
                "billingAccount": {
                    "id": "BAN-123456"
                },
                "realizingResource": [
                    {
                        "id": "18765551234",
                        "name": "msisdn"
                    }
                ],
                "productCharacteristic": [
                    {
                        "name": "discount_type",
                        "value": "fixed_amount"
                    },
                    {
                        "name": "max_redemptions_per_entity",
                        "value": 1
                    },
                    {
                        "name": "priority",
                        "value": 100
                    },
                    {
                        "name": "exclusion_group",
                        "value": null
                    },
                    {
                        "name": "correlation_id",
                        "value": "ENGINE-7f3a9bc2-CPN-DEVICE-200OFF"
                    },
                    {
                        "name": "applies_to",
                        "value": ""
                    },
                    {
                        "name": "name_es",
                        "value": "Descuento Cliente Leal $200"
                    },
                    {
                        "name": "sub_type",
                        "value": null
                    },
                    {
                        "name": "promotion_type",
                        "value": "Discount"
                    },
                    {
                        "name": "evaluation_ms",
                        "value": "12.34"
                    },
                    {
                        "name": "tier_info",
                        "value": null
                    },
                    {
                        "name": "rule",
                        "value": {
                            "id": "R-001",
                            "name": "Rule 001"
                        }
                    },
                    {
                        "name": "condition_trace",
                        "value": []
                    }
                ],
                "@type": "Product"
            },
            "@type": "ProductOfferingQualificationItem"
        },
        {
            "id": "2",
            "state": "done",
            "qualificationItemResult": "notEligible",
            "productOffering": {
                "id": "CPN010",
                "name": "VIP $50 Off",
                "@type": "ProductOfferingRef"
            },
            "product": {
                "billingAccount": {
                    "id": "BAN-123456"
                },
                "realizingResource": [
                    {
                        "id": "18765551234",
                        "name": "msisdn"
                    }
                ],
                "productCharacteristic": [
                    {
                        "name": "evaluation_ms",
                        "value": "12.34"
                    }
                ]
            },
            "eligibilityUnavailabilityReason": [
                {
                    "code": "Redemption limit reached",
                    "label": "Already redeemed (1/1)"
                }
            ],
            "@type": "ProductOfferingQualificationItem"
        }
    ]
}
Definitions

Each of the response parameters is detailed.

nametypedescription
@typestringStatic value: "ProductOfferingQualification"
productOfferingQualificationItemarrayList of qualification results — one entry per eligible coupon plus one per rejected coupon
productOfferingQualificationItem[].idstringSequential item identifier
productOfferingQualificationItem[].statestringEvaluation state. Static value: "done"
productOfferingQualificationItem[].qualificationItemResultstringEligibility result. Values: "eligible" or "notEligible"
productOfferingQualificationItem[].productOffering.idstringCoupon ID. Example: "CPN-DEVICE-200OFF"
productOfferingQualificationItem[].productOffering.namestringCoupon name. Example: "Loyal Customer $200 Off"
productOfferingQualificationItem[].productOffering.@typestringStatic value: "ProductOfferingRef"
productOfferingQualificationItem[].product.productTerm[].namestringIdentifier of the promotion
productOfferingQualificationItem[].product.productTerm[].duration.amountintegerPromotion term in units defined. Example: 36
productOfferingQualificationItem[].product.productTerm[].duration.unitsstringUnits of Promotion amount. Example: "months"
productOfferingQualificationItem[].product.productTerm[].validFor.startDateTimestringPromotion validity start.
productOfferingQualificationItem[].product.productTerm[].validFor.endDateTimestringPromotion validity end.
productOfferingQualificationItem[].product.productTerm[].validFor.@typestringStatic value: "ProductTerm"
productOfferingQualificationItem[].product.productPrice[priceType=discountValue].price.dutyFreeAmount.valuestringDiscount value. Example: 200.00
productOfferingQualificationItem[].product.billingAccount.idstringCustomer BAN.
productOfferingQualificationItem[].product.realizingResource.idstringvalue of MSISDN.
productOfferingQualificationItem[].product.realizingResource.namestringMSISDN.
productOfferingQualificationItem[].product.productCharacteristic[discount_type].valuestringType of discount
productOfferingQualificationItem[].product.productCharacteristic[max_redemptions_per_entity].valueintegerMax times this coupon can be redeemed per customer
productOfferingQualificationItem[].product.productCharacteristic[priority].valueintegerDisplay priority
productOfferingQualificationItem[].product.productCharacteristic[exclusion_group].valuestringMutual exclusion group
productOfferingQualificationItem[].product.productCharacteristic[correlation_id].valuestringEngine-generated unique ID for this coupon evaluation.
productOfferingQualificationItem[].product.productCharacteristic[applies_to].valuestringWhat the promotion applies to.
productOfferingQualificationItem[].product.productCharacteristic[name_es].valuestringPromotion name in Spanish.
productOfferingQualificationItem[].product.productCharacteristic[sub_type].valuestringPromotion sub-category.
productOfferingQualificationItem[].product.productCharacteristic[promotion_type].valuestringGeneral promotion category.
productOfferingQualificationItem[].product.productCharacteristic[evaluation_ms].valuestringTime taken to evaluate (milliseconds).
productOfferingQualificationItem[].product.productCharacteristic[tier_info].valuestringInfo of the tier
productOfferingQualificationItem[].product.productCharacteristic[rule].value.idstringRule Id
productOfferingQualificationItem[].product.productCharacteristic[rule].value.namestringRule Name
productOfferingQualificationItem[].product.productCharacteristic[condition_trace].valuearrayarray of evaluated conditions
productOfferingQualificationItem[].product.@typearrayStatic value: "Product"
productOfferingQualificationItem[].@typearrayStatic value: "ProductOfferingQualificationItem"
productOfferingQualificationItem[].eligibilityUnavailabilityReason[].codestringFailed condition detail (rejected only). Maps from rejected_coupons[].failed_conditions[0]
productOfferingQualificationItem[].eligibilityUnavailabilityReason[].labelstringHuman-readable rejection reason. Maps from rejected_coupons[].reason

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "The request is invalid or not properly formed.",
      "description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
    }]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource."
    }]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The server could not find the requested resource.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method PATCH not allowed for : /{businessId}/productOfferingQualification/productOfferingQualification"
        }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "Internal Server Error",
      "description": "The request failed due to an internal error."
    }]
}
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "Not implemented",
      "description" : "Operation GET /productOfferingQualification/productOfferingQualification for Business Id: xxxx not implemented"
    }]
  }

#####

#

Reviews